
var express = require('express');
var router = express.Router();
var sql = require('../sql.js');
router.use('/', function(req, res) {
  /*res.send('1');*/ 
  var userName = req.query[0]; 
  sql(`update admin set state=0 where userName="${userName}"`,function(qerr,vals,fields){
    if(qerr){
        throw qerr
    }else{
        return res.json(vals)
    }
 })
})
module.exports = router;
